package main

import (
	"fmt"
	"reflect"
)

type MergeMsgOV struct {
	Merge  int `json:"merge"`
	Pet    int `json:"pet"`
	PERSON int `json:"person"`
}

func main() {
	mer := MergeMsgOV{
		Merge:  1,
		Pet:    2,
		PERSON: 3,
	}
	res, _ := getPushInfoValue(&mer, "pet")
	fmt.Println("res ==============", res)
}

func getPushInfoValue(pushinfo *MergeMsgOV, field string) (interface{}, error) {
	res := reflect.ValueOf(pushinfo).Elem().FieldByName("PERSON").Interface()
	return res, nil
}

//
